package org.example.deadQueue;

import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
import org.example.RabbitMqUtils;

/**
 * @BelongsProject: springboot3
 * @BelongsPackage: org.example.deadQueue
 * @Author: guodf
 * @CreateTime: 2024-01-31  10:33
 * @Description:
 * @Version: 1.0.0
 */
public class product01 {

    public static final String NORMAL_EXCHANGE_NAME = "normal_exchange";

    public static void main(String[] args) throws Exception
    {
        Channel channel = RabbitMqUtils.getChannel();
//        AMQP.BasicProperties props = new AMQP.BasicProperties.Builder().expiration("10000").build();

        for (int i = 0; i < 10; i++) {
            String msg = "info" + i;
            channel.basicPublish(NORMAL_EXCHANGE_NAME, "zhangsan", null, msg.getBytes());
        }
    }
}
